<?php
defined('_JEXEC') or die;

/**
 * Manager language helper class.
 *
 * @author	NhanLT
 */
class ManagerHelper { 

	static function showMenuPim($c_active) {
		$com_Name  = "option=com_manager";
		
		JSubMenuHelper::addEntry(JText::_('Product Management'), "index.php?".$com_Name, self::setMenuActive('product',$c_active));  
        JSubMenuHelper::addEntry(JText::_('SMS Management'), "index.php?$com_Name&c=sms", self::setMenuActive('sms',$c_active));
        JSubMenuHelper::addEntry(JText::_('Config Management'), "index.php?$com_Name&c=config", self::setMenuActive('config',$c_active));		
	}
	
	static function setMenuActive($c, $menu_active) {
		if($c==$menu_active) return true;
		return false;
	}
	
	static function showToolBar($text, $showExport=false, $showManage=true) {	
		if ($showExport) {
			JToolBarHelper::save('toExcel', "Export Excel");
			JToolBarHelper::save('toPDF', "Export PDF");
			if ($showManage) {
				JToolBarHelper::divider();
			}
		}
		
		if ($showManage) {
			JToolBarHelper::addNew();
			JToolBarHelper::editList();
	        JToolBarHelper::deleteList('Are you sure?', 'delete');
		}
		
		//JToolBarHelper::deleteList('Are you sure?', 'delete');
        JToolBarHelper::title( JText::_($text), 'searchtext.png' );
	}
	
	static function showToolBarForm($title) {
		JToolBarHelper::title($title, 'searchtext.png');
		JToolBarHelper::save();
		JToolBarHelper::cancel();
	}	
}
